package com.hspedu.poly_.polyparameter;

/**
 * @Author Stringzhua
 * @Date 2024/3/2 20:15
 * description:员工类
 */
public class Employee {
    private String name;
    private double monsalary;

    //计算年工资getAnnual
    public double getAnnual() {
        return monsalary * 12;
    }

    public Employee(String name, double monsalary) {
        this.name = name;
        this.monsalary = monsalary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getMonsalary() {
        return monsalary;
    }

    public void setMonsalary(double monsalary) {
        this.monsalary = monsalary;
    }
}
